export async function fetchInlineScriptsSet() {
  try {
    const html = await fetch('/').then(res => res.text());
    const scriptRegex = /<script(?:\s+[^>]*)?>(.*?)<\/script\s*>/gi;
    // 获取匹配到的所有<script>标签内容
    const scripts = html.match(scriptRegex) ?? [];
    // 将脚本标签内容存入集合并返回
    return new Set(scripts);
  } catch (e) {
    console.error('版本检测获取首页失败:', e);
    return null;
  }
}
